import request from '@/utils/request'

export function getDepartment() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
// 新增部门
export function addDepartment(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 删除部门
export function delDepts(id) {
  return request({
    url: '/company/department/' + id,
    method: 'delete'

  })
}

// 查询部门详情
export function getDeptsDatil(id) {
  return request({
    url: '/company/department/' + id,
    method: 'get'

  })
}

export function editDeptsDatil(data) {
  return request({
    url: '/company/department/' + data.id,
    method: 'put',
    data
  })
}
